/*
 * AgvAPI.h
 *
 *  Created on: 16/11/2013
 *      Author: gonzalo
 */

#ifndef ROBOTAGVAPI_H_
#define ROBOTAGVAPI_H_

#include "../middleware/CommunicationAGV.h"
#include "../middleware/CommunicationRobot11.h"
#include "../middleware/CommunicationRobot12.h"
#include "../middleware/CommunicationRobot5.h"
#include "../middleware/CommunicationCanastos.h"
#include "../common/StringUtils.h"
#include "../logger/logger.h"
#include <sstream>
#include "AdminKeys.h"

#define TODOS_OCUPADOS -1

class RobotAgvAPI {
public:
	RobotAgvAPI(AdminKeys adminKeys, std::string hostName);
	std::vector<TipoPieza> atenderPedidoPiezas();
	EstadoCanasto getEstadoCanasto(TipoPieza);
	int buscarPosicionReemplazo();
	void reemplazarCanasto(TipoPieza pieza, int posicion);
	virtual ~RobotAgvAPI();
private:
	int id;
	std::string mostrarCanastos(std::vector<Canasto> cs);
	middleware::CommunicationAGV *comAGV;
	middleware::CommunicationRobot5 *comRobot5;
	middleware::CommunicationCanastos *comCanastos;
	middleware::CommunicationRobotPiezas* comRobotPiezas1;
	middleware::CommunicationRobotPiezas* comRobotPiezas2;
};

#endif /* ROBOTAGVAPI_H_ */
